<template>
  <div class="home">
    <div @click="addNumFn">{{ a }}</div>
    <img alt="Vue logo" src="../assets/logo.png" />
    <HelloWorld
      msg="Welcome to Your Vue.js + TypeScript App"
      :attra="a"
      @sendDate="sendDate"
    />
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import HelloWorld from "@/components/HelloWorld.vue"; // @ is an alias to /src

@Component({
  components: {
    HelloWorld,
  },
  created() {},
  computed: {},
})
export default class Home extends Vue {
  private a: number = 2;

  addNumFn(): void {
    this.a += 1;
  }

  sendDate(): void {
    this.a = 2;
  }
}
</script>
